<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <title>VUE2基础框架</title>
     
  </head>
  <body style="background-color: ;display: none;">    <!--style 设置活动主色-->
  	
    <div id="app" class="index-page">
		<div class="act-des over-hid">
        <div class="img">
            <img src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/tmp/main_banner.png" alt="">
            <!--<div class="yaoyiyao-hu"></div>-->
        </div>
                <!--摇一摇组件-->
        <wii-shake :conf="shake" id="J_Yao" class="mt30" style="display: none;"></wii-shake>      
        <!--摇过后圆环的样子-->
        <div id="J_NoReward" class="no-content-circle m-center mt50 mb20 " style="display: block;">
            <div class="bengkui-div">
                <div class="bengkui m-center"></div>
            </div>
 
            <div  class="J_NoRewardMsg" style="display: block;" >
                <p class="p1 mt20">很遗憾，未中奖</p>
                <p class="p2">再接再厉</p> 
            </div>
           <!--摇奖次数用完了-->
            <div class="J_NoRewardMsg" style="display: none;" >
                <p class="p1 mt20">摇奖次数用完了</p>
                <p class="p2">邀请好友，或者</p>
                <p class="p2">明天再来吧</p>                
            </div>
            <div class="red-ring"></div>
        </div>
    </div>
    
    <div class="page-bottom" >
        <div class="yao-tip m-center">
            <span class="fl">请用力<span class="yaoyiyao">摇一摇</span>手机</span>
            <span class="fr" >剩余<span class="num" id="surplus_play_times" style="background-color:;">1</span>次</span>
        </div>
    </div>

    <!-- 外链弹层 -->
    <div id="J_YaoSuccess" class="pop-wrapper" style="display: none;">
        <div class="wailian-pop">
            <div class="pop-close-btn">
                <div class="close-btn m-center mt28"></div>
            </div>
            <div class="gift m-center"></div>
            <p class="p1 mt40">恭喜您摇到</p>
            <p class="p2 m-center mt50  J_title"></p>
            <a class="btn m-center mt50 goBtn J_url"  style="background-color: ;">前去领取</a>
        </div>
    </div>
    <!-- 中奖弹层 -->
    <div id="J_AwardSuccess" class="pop-wrapper" style="display: none;">
        <div class="zhongjiang-pop">
            <div class="pop-close-btn">
                <div class="close-btn m-center mt28"></div>
            </div>

    <section class="giftBox-top">
        <div class="star1"><img src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/01xx.png"></div>
        <div class="star2"><img src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/01xx.png"></div>
        <div class="star3"><img src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/02xx.png"></div>
        <div class="star4"><img src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/02xx.png"></div>
        <div class="star-box"><img src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/hz.png"></div>
    </section>
    <section class="giftBox-mh"></section>
            <div class="img mt20 ">
                <img class="J_img" src="http://www.ihuyue.cn/2017_newyear/ls/yaoyiyao/images/tmp/main_banner.png">
            </div>
            <p class="p1 mt20">恭喜您摇到</p>
            <p class="p2 m-center mt16 J_title"></p>
            <a class="btn m-center awardBtn mt20 J_url" href="" style="background-color:;">立即领取</a>
        </div>
     </div>
	</div>
	<script>
  	  var $CONFIG = {};
          $CONFIG.page = {};
          $CONFIG.page.submit_url = ''; //摇动调取接口的url
          $CONFIG.isShare = {
                isShareBtn:''  //是否显示分享按钮  是否邀请好友
        }
          $CONFIG.page.actId = '';    //摇动调取接口所需要传递的活动id
         // 次数是否用完
          $CONFIG.page.isDrawEnd ='' ;
          $CONFIG.page.drawType = '';    
  </script>
  </body>
  <!--<script>
  
    var successAjax = function(){
    	console.log("调取摇的页面")
   	  $.ajax({
            type: "POST",
            url: $CONFIG.page.submit_url,
            dataType: "json",
            data: {
                act_id: $CONFIG.page.actId
            },
            success: function (data) {
            	 if (data.ret !== 0) {
            switch (data.errorcode) {
                case 14019: // 抽奖次数已用完
                    $CONFIG.page.isDrawEnd = 1;
                    var noAwardMsg = '<p class="p1 mt20">摇奖次数用完了</p>';
                    if ($CONFIG.isShare.isShareBtn) {
                        noAwardMsg += '<p class="p2">邀请好友，或者</p>';
                    }
                    noAwardMsg += '<p class="p2">明天再来吧</p>';

                    $("#J_Yao").hide();
                    $("#J_NoReward").show();
//                  alert(noAwardMsg)
//                  alert($("#J_NoReward").find(".J_NoRewardMsg"))
                    $("#J_NoReward").find(".J_NoRewardMsg").html(noAwardMsg);
                    $("#surplus_play_times").text(0);

                    //TODO  分享好友按钮没有了
                    //$('.J_share').show();
                      _self.isShake = false 
                    break;
                default:
                    GLOBAL.pop("摇动失败");
                    break;
            }

            GLOBAL.ajaxRequesting = false;
            return;
        }
         $("#surplus_play_times").text(data.data.surplus_play_times);
                // data.data.award_type 中奖类型 0：未中奖；1：中奖；2：外链
                if (data.data.award_type === 0) {
                    var noAwardMsg = '<p class="p1 mt20">很遗憾，未中奖</p>';
                    noAwardMsg += '<p class="p2">再接再厉</p>';
                    $("#J_Yao").hide();
                    $("#J_NoReward").find(".J_NoRewardMsg").html(noAwardMsg);
                    $("#J_NoReward").show();
                    //$(".J_Draw").show();
//                  GLOBAL.yaoFlag = true;
                     _self.isShake = false 
                    //3秒后自动可以摇
                    setTimeout(function () {
                        //如果当前处于可以摇奖的情况，则继续摇奖
                        if ($CONFIG.page.isDrawEnd != 1) {
                             _self.isShake = true
                            $("#J_Yao").show();
                            $("#J_NoReward").hide();
                        }
                    }, 3000);
                } else if (data.data.award_type === 1||data.data.award_type === "1") {
                   _self.isShake = true
                    $("#J_AwardSuccess").show();
                    $("#J_AwardSuccess").find(".J_img").attr("src", data.data.award_img);
                    $("#J_AwardSuccess").find(".J_title").html(data.data.award.FAwardName);
                    $("#J_AwardSuccess").find(".J_url").attr('href', data.data.award_url);

                } else if (data.data.award_type === 2) {
                    _self.isShake = true
                    $("#J_YaoSuccess").show();
                    $("#J_YaoSuccess").find(".J_title").html(data.data.non_award.FLinkTitle);
                    $("#J_YaoSuccess").find(".J_url").attr('href', data.data.non_award.FLinkUrl);
                }
            }
   	   })
   	}
   successAjax()          //调取方法
  </script>-->
  </html>